﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VMDetailTracking.aspx.cs"
    Inherits="ConsolidationTool.WebParts.Layouts.CReport.VMDetailTracking" DynamicMasterPageFile="~masterurl/default.master" %>

<%@ Register TagName="EntitySelector" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/CommonEntitySelector.ascx" %>
<%@ Register TagName="ExportExcel" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/PublicExportExcel.ascx" %>
<%@ Register TagName="VMTreeControl" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/VMTreeControl.ascx" %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <script type="text/javascript">

        function NavigationToDetail() {
            var search = location.search;
            if (search != '') {
                search += "&detail=true";
            } else {
                search += "?detail=true";
            }
            search = location.pathname + search;
            window.open(search);
        }

        function art_switch() {
            $(".art-float-box").toggle();
        }

        $(function () {
            if (location.href.indexOf("detail=true") != -1)
                $("#art_vm_detail").hide(); 
        });
    </script>
    <style type="text/css">.s4-ba{ padding:0 1em;}
    .art-float-box{display:none; position: absolute; top:20px; left:0; background-color:#ccc; padding:1em; border:1px solid #000; width:271px; max-height:400px; overflow:auto;}
    </style>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <div class="fs-webpart-top">
        <RE:EntitySelector ID="commonEntitySelector" Mode="JustEntity" runat="server" />
    </div>
    <br />
    <asp:Button ID="GenerateReport" runat="server" Text="Generate Report" OnClick="GenerateReport_Click" />
    <RE:ExportExcel ID="ExportExcel1" runat="server" />
    <div style="margin: 1em 0;">

        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
    <RE:VMTreeControl ID="VMTreeControl1" runat="server" />
                </td>
                <td> 
                <h3 style=" display:inline;"><asp:LinkButton ID="btChoose" ToolTip="Region" runat="server">OK</asp:LinkButton></h3> 
                </td>
            </tr>
        </table>

   
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <asp:Panel runat="server" ID="rgcArae" Visible="false">
                        RGC:
                        <asp:DropDownList ID="drRGC" ToolTip="RGC" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </asp:Panel>
                </td>
                <td>
                    <asp:Panel runat="server" ID="customerArea" Visible="false" style=" position: relative;">
           
                            <h3>
                        Customer:  &nbsp;  &nbsp; 
                        <a href="javascript:art_switch();">Choose</a> &nbsp;  &nbsp; 
                        <asp:LinkButton ID="lbFilterCustomer" ToolTip="Customer" runat="server">OK</asp:LinkButton>
                            </h3>
     
                        <div id="art_digbox" class="art-float-box">   
             
                            <asp:CheckBoxList ID="cblCustomer" runat="server">
                           </asp:CheckBoxList>
                           
                        </div>
                  
                    </asp:Panel>
                </td>
                <td>
                    <asp:Panel runat="server" ID="acArea" Visible="false">
                        AC:
                        <asp:DropDownList ID="drAC" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </asp:Panel>
                </td>
            </tr>
        </table>
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    Sort:
                </td>
                <td>
                    <asp:DropDownList ID="drFilter" runat="server" AutoPostBack="true">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp; Order:
                </td>
                <td>
                    <asp:RadioButtonList ID="rbOrder" runat="server" AutoPostBack="true" RepeatDirection="Horizontal">
                        <asp:ListItem Text="Ascending" />
                        <asp:ListItem Text="Descending" Selected="True" />
                    </asp:RadioButtonList>
                </td>
                <td>
                    &nbsp; &nbsp; &nbsp; <a href="javascript:NavigationToDetail();" style=" display:none;" id="art_vm_detail">Per Unit</a>
                </td>
            </tr>
        </table>
    </div>
    <asp:Label Text="" ID="lbInfo" ForeColor="Red" runat="server" />
    <table border="0" cellpadding="0" cellspacing="0" class="commontable">
    <thead>
        <tr>
            <td colspan="18">
                <asp:Literal ID="lrFilterDescription" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td colspan="4">
            </td>
            <asp:Repeater runat="server" ID="GVTrackingTitle">
                <ItemTemplate>
                    <td>
                        <asp:Label runat="server" Text='<%#  GetDataItem()%>'></asp:Label>
                    </td>
                </ItemTemplate>
            </asp:Repeater>
        </tr>
        </thead>
        <asp:Repeater runat="server" ID="GVTrackingReport">
            <ItemTemplate>
                <asp:Repeater runat="server" ID="GVTrackingSubrow">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("rgc") %>'></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("cusomercode") %>'></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" Text='<%# Eval("column") %>'></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" Text='<%# Eval("unit") %>'></asp:Label>
                            </td>
                            <asp:Repeater runat="server" ID="GVTrackingRow">
                                <ItemTemplate>
                                    <td align="right">
                                        <asp:Label runat="server" Text='<%#  GetDataItem()%>'></asp:Label>
                                    </td>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
                <tr>
                    <td colspan="18">
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    VMDetailTracking
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
    VMDetailTracking
</asp:Content>
